<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SARibbon: SARibbonToolButton::PrivateData类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="SA-logo.png"/></td>
  <td id="projectalign">
   <div id="projectname">SARibbon<span id="projectnumber">&#160;2.4.2</span>
   </div>
   <div id="projectbrief">SARibbon wiki</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('class_s_a_ribbon_tool_button_1_1_private_data.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pub-static-attribs">静态 Public 属性</a> &#124;
<a href="class_s_a_ribbon_tool_button_1_1_private_data-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">SARibbonToolButton::PrivateData类 参考</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a52a14ab6f11b99c0a39faa3a50998e44" id="r_a52a14ab6f11b99c0a39faa3a50998e44"><td class="memItemLeft" align="right" valign="top"><a id="a52a14ab6f11b99c0a39faa3a50998e44" name="a52a14ab6f11b99c0a39faa3a50998e44"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>PrivateData</b> (<a class="el" href="class_s_a_ribbon_tool_button.html">SARibbonToolButton</a> *p)</td></tr>
<tr class="separator:a52a14ab6f11b99c0a39faa3a50998e44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e9815c1bd1e36a8a2cabecc45067ce4" id="r_a8e9815c1bd1e36a8a2cabecc45067ce4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8e9815c1bd1e36a8a2cabecc45067ce4">updateStatusByMousePosition</a> (const QPoint &amp;pos)</td></tr>
<tr class="memdesc:a8e9815c1bd1e36a8a2cabecc45067ce4"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据鼠标的位置更新状态，主要用于判断鼠标是否位于subcontrol  <br /></td></tr>
<tr class="separator:a8e9815c1bd1e36a8a2cabecc45067ce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb38e7a1c0c09b6e8cc7c3330317433a" id="r_acb38e7a1c0c09b6e8cc7c3330317433a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acb38e7a1c0c09b6e8cc7c3330317433a">updateDrawRect</a> (const QStyleOptionToolButton &amp;opt)</td></tr>
<tr class="memdesc:acb38e7a1c0c09b6e8cc7c3330317433a"><td class="mdescLeft">&#160;</td><td class="mdescRight">更新绘图的几个关键尺寸  <br /></td></tr>
<tr class="separator:acb38e7a1c0c09b6e8cc7c3330317433a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1f7c2d493bfcffceaa07ce1de3156f0" id="r_ac1f7c2d493bfcffceaa07ce1de3156f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac1f7c2d493bfcffceaa07ce1de3156f0">updateSizeHint</a> (const QStyleOptionToolButton &amp;opt)</td></tr>
<tr class="memdesc:ac1f7c2d493bfcffceaa07ce1de3156f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">更新sizehint  <br /></td></tr>
<tr class="separator:ac1f7c2d493bfcffceaa07ce1de3156f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd2575180df92c2222aa1d69b4772654" id="r_afd2575180df92c2222aa1d69b4772654"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afd2575180df92c2222aa1d69b4772654">calcDrawRects</a> (const QStyleOptionToolButton &amp;opt, QRect &amp;iconRect, QRect &amp;textRect, QRect &amp;indicatorArrowRect, int <a class="el" href="class_s_a_ribbon_tool_button.html#a69f1776079bf549ef63823d93e7dc06f">spacing</a>, int indicatorLen) const</td></tr>
<tr class="memdesc:afd2575180df92c2222aa1d69b4772654"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算绘图的几个关键区域  <br /></td></tr>
<tr class="separator:afd2575180df92c2222aa1d69b4772654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85476b6718f349246e9e9480bd41c138" id="r_a85476b6718f349246e9e9480bd41c138"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a85476b6718f349246e9e9480bd41c138">calcSmallButtonDrawRects</a> (const QStyleOptionToolButton &amp;opt, QRect &amp;iconRect, QRect &amp;textRect, QRect &amp;indicatorArrowRect, int <a class="el" href="class_s_a_ribbon_tool_button.html#a69f1776079bf549ef63823d93e7dc06f">spacing</a>, int indicatorLen) const</td></tr>
<tr class="memdesc:a85476b6718f349246e9e9480bd41c138"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算小按钮模式下的绘制尺寸  <br /></td></tr>
<tr class="separator:a85476b6718f349246e9e9480bd41c138"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb95c0fd2f97a05bc033c7fc16a27b1e" id="r_acb95c0fd2f97a05bc033c7fc16a27b1e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acb95c0fd2f97a05bc033c7fc16a27b1e">calcLargeButtonDrawRects</a> (const QStyleOptionToolButton &amp;opt, QRect &amp;iconRect, QRect &amp;textRect, QRect &amp;indicatorArrowRect, int <a class="el" href="class_s_a_ribbon_tool_button.html#a69f1776079bf549ef63823d93e7dc06f">spacing</a>, int indicatorLen) const</td></tr>
<tr class="memdesc:acb95c0fd2f97a05bc033c7fc16a27b1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算大按钮模式下的绘制尺寸（普通）  <br /></td></tr>
<tr class="separator:acb95c0fd2f97a05bc033c7fc16a27b1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a176eb265edf8b5c2fdfb48219e052ae6" id="r_a176eb265edf8b5c2fdfb48219e052ae6"><td class="memItemLeft" align="right" valign="top">QSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a176eb265edf8b5c2fdfb48219e052ae6">adjustIconSize</a> (const QRect &amp;buttonRect, const QSize &amp;originIconSize) const</td></tr>
<tr class="memdesc:a176eb265edf8b5c2fdfb48219e052ae6"><td class="mdescLeft">&#160;</td><td class="mdescRight">适应iconsize  <br /></td></tr>
<tr class="separator:a176eb265edf8b5c2fdfb48219e052ae6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e136b6f3704af9d8ed4391437dc9170" id="r_a3e136b6f3704af9d8ed4391437dc9170"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3e136b6f3704af9d8ed4391437dc9170">hasIndicator</a> (const QStyleOptionToolButton &amp;opt) const</td></tr>
<tr class="memdesc:a3e136b6f3704af9d8ed4391437dc9170"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断是否有Indicator  <br /></td></tr>
<tr class="separator:a3e136b6f3704af9d8ed4391437dc9170"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2ceb8ec65b84e145b8c4e7e1d54bdd9" id="r_ac2ceb8ec65b84e145b8c4e7e1d54bdd9"><td class="memItemLeft" align="right" valign="top">QSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac2ceb8ec65b84e145b8c4e7e1d54bdd9">calcSizeHint</a> (const QStyleOptionToolButton &amp;opt)</td></tr>
<tr class="memdesc:ac2ceb8ec65b84e145b8c4e7e1d54bdd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算sizehint  <br /></td></tr>
<tr class="separator:ac2ceb8ec65b84e145b8c4e7e1d54bdd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6527ebe37c58466ca38e492ff2d517b3" id="r_a6527ebe37c58466ca38e492ff2d517b3"><td class="memItemLeft" align="right" valign="top">QSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6527ebe37c58466ca38e492ff2d517b3">calcSmallButtonSizeHint</a> (const QStyleOptionToolButton &amp;opt)</td></tr>
<tr class="separator:a6527ebe37c58466ca38e492ff2d517b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6c08de93437c4fc868d8a4829819c2a" id="r_af6c08de93437c4fc868d8a4829819c2a"><td class="memItemLeft" align="right" valign="top">QSize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af6c08de93437c4fc868d8a4829819c2a">calcLargeButtonSizeHint</a> (const QStyleOptionToolButton &amp;opt)</td></tr>
<tr class="separator:af6c08de93437c4fc868d8a4829819c2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf39c798bd2f62a16fb1f71d16015820" id="r_abf39c798bd2f62a16fb1f71d16015820"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abf39c798bd2f62a16fb1f71d16015820">calcTextDrawRectHeight</a> (const QStyleOptionToolButton &amp;opt) const</td></tr>
<tr class="memdesc:abf39c798bd2f62a16fb1f71d16015820"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算文本高度  <br /></td></tr>
<tr class="separator:abf39c798bd2f62a16fb1f71d16015820"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7ce60606bef54826c1ef0efe38d2bda" id="r_ac7ce60606bef54826c1ef0efe38d2bda"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac7ce60606bef54826c1ef0efe38d2bda">estimateLargeButtonTextWidth</a> (int buttonHeight, int textDrawRectHeight, const QString &amp;text, const QFontMetrics &amp;fm, int maxTrycount=3)</td></tr>
<tr class="memdesc:ac7ce60606bef54826c1ef0efe38d2bda"><td class="mdescLeft">&#160;</td><td class="mdescRight">估算一个最优的文字尺寸，在可以换行的情况下会进行换行，且只会换一行  <br /></td></tr>
<tr class="separator:ac7ce60606bef54826c1ef0efe38d2bda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac18584a78fbe0fc21b7bd217f5b76a2b" id="r_ac18584a78fbe0fc21b7bd217f5b76a2b"><td class="memItemLeft" align="right" valign="top"><a id="ac18584a78fbe0fc21b7bd217f5b76a2b" name="ac18584a78fbe0fc21b7bd217f5b76a2b"></a>
QPixmap&#160;</td><td class="memItemRight" valign="bottom"><b>createIconPixmap</b> (const QStyleOptionToolButton &amp;opt, const QSize &amp;iconsize) const</td></tr>
<tr class="separator:ac18584a78fbe0fc21b7bd217f5b76a2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb1d1050d612ba630597c5c53c5c6b1e" id="r_adb1d1050d612ba630597c5c53c5c6b1e"><td class="memItemLeft" align="right" valign="top"><a id="adb1d1050d612ba630597c5c53c5c6b1e" name="adb1d1050d612ba630597c5c53c5c6b1e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>getTextAlignment</b> () const</td></tr>
<tr class="separator:adb1d1050d612ba630597c5c53c5c6b1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00ead57d1fbebadda3b742c6246e350a" id="r_a00ead57d1fbebadda3b742c6246e350a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a00ead57d1fbebadda3b742c6246e350a">isTextNeedWrap</a> () const</td></tr>
<tr class="memdesc:a00ead57d1fbebadda3b742c6246e350a"><td class="mdescLeft">&#160;</td><td class="mdescRight">确认文字是否确切要换行显示  <br /></td></tr>
<tr class="separator:a00ead57d1fbebadda3b742c6246e350a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a6dd298358b5f4ae7c66094bd0838fc36" id="r_a6dd298358b5f4ae7c66094bd0838fc36"><td class="memItemLeft" align="right" valign="top">static QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6dd298358b5f4ae7c66094bd0838fc36">simplified</a> (const QString &amp;str)</td></tr>
<tr class="memdesc:a6dd298358b5f4ae7c66094bd0838fc36"><td class="mdescLeft">&#160;</td><td class="mdescRight">仅仅对<br  />
进行剔除  <br /></td></tr>
<tr class="separator:a6dd298358b5f4ae7c66094bd0838fc36"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ab7e0e7e0b1e39d34563ed42397baca11" id="r_ab7e0e7e0b1e39d34563ed42397baca11"><td class="memItemLeft" align="right" valign="top"><a id="ab7e0e7e0b1e39d34563ed42397baca11" name="ab7e0e7e0b1e39d34563ed42397baca11"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mMouseOnSubControl</b> { false }</td></tr>
<tr class="memdesc:ab7e0e7e0b1e39d34563ed42397baca11"><td class="mdescLeft">&#160;</td><td class="mdescRight">这个用于标记MenuButtonPopup模式下，鼠标在文本区域 <br /></td></tr>
<tr class="separator:ab7e0e7e0b1e39d34563ed42397baca11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96888f6575307ae436e5ad058d13110a" id="r_a96888f6575307ae436e5ad058d13110a"><td class="memItemLeft" align="right" valign="top"><a id="a96888f6575307ae436e5ad058d13110a" name="a96888f6575307ae436e5ad058d13110a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mMenuButtonPressed</b> { false }</td></tr>
<tr class="memdesc:a96888f6575307ae436e5ad058d13110a"><td class="mdescLeft">&#160;</td><td class="mdescRight">由于Indicator改变，因此hitButton不能用QToolButton的hitButton <br /></td></tr>
<tr class="separator:a96888f6575307ae436e5ad058d13110a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22096ade7278d15434d1d917c0465542" id="r_a22096ade7278d15434d1d917c0465542"><td class="memItemLeft" align="right" valign="top"><a id="a22096ade7278d15434d1d917c0465542" name="a22096ade7278d15434d1d917c0465542"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mWordWrap</b> { false }</td></tr>
<tr class="memdesc:a22096ade7278d15434d1d917c0465542"><td class="mdescLeft">&#160;</td><td class="mdescRight">标记是否文字换行 @default false <br /></td></tr>
<tr class="separator:a22096ade7278d15434d1d917c0465542"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b871c78507d05644b966937661d8373" id="r_a7b871c78507d05644b966937661d8373"><td class="memItemLeft" align="right" valign="top"><a id="a7b871c78507d05644b966937661d8373" name="a7b871c78507d05644b966937661d8373"></a>
<a class="el" href="class_s_a_ribbon_tool_button.html#a53fdbafe05f80a4048c17443fb1d99be">SARibbonToolButton::RibbonButtonType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>mButtonType</b> { SARibbonToolButton::LargeButton }</td></tr>
<tr class="separator:a7b871c78507d05644b966937661d8373"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade024f1d942d6e70242d71e4a438e647" id="r_ade024f1d942d6e70242d71e4a438e647"><td class="memItemLeft" align="right" valign="top"><a id="ade024f1d942d6e70242d71e4a438e647" name="ade024f1d942d6e70242d71e4a438e647"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>mSpacing</b> { 1 }</td></tr>
<tr class="memdesc:ade024f1d942d6e70242d71e4a438e647"><td class="mdescLeft">&#160;</td><td class="mdescRight">按钮和边框的距离 <br /></td></tr>
<tr class="separator:ade024f1d942d6e70242d71e4a438e647"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11bcb3dc1c7b942449fb12a7a5336b16" id="r_a11bcb3dc1c7b942449fb12a7a5336b16"><td class="memItemLeft" align="right" valign="top"><a id="a11bcb3dc1c7b942449fb12a7a5336b16" name="a11bcb3dc1c7b942449fb12a7a5336b16"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>mIndicatorLen</b> { 8 }</td></tr>
<tr class="memdesc:a11bcb3dc1c7b942449fb12a7a5336b16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicator的长度 <br /></td></tr>
<tr class="separator:a11bcb3dc1c7b942449fb12a7a5336b16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fe87fe0357eae24df7c9f0521367df2" id="r_a6fe87fe0357eae24df7c9f0521367df2"><td class="memItemLeft" align="right" valign="top"><a id="a6fe87fe0357eae24df7c9f0521367df2" name="a6fe87fe0357eae24df7c9f0521367df2"></a>
QRect&#160;</td><td class="memItemRight" valign="bottom"><b>mDrawIconRect</b></td></tr>
<tr class="memdesc:a6fe87fe0357eae24df7c9f0521367df2"><td class="mdescLeft">&#160;</td><td class="mdescRight">记录icon的绘制位置 <br /></td></tr>
<tr class="separator:a6fe87fe0357eae24df7c9f0521367df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32d4d131ae69751924a2759964b8e6f4" id="r_a32d4d131ae69751924a2759964b8e6f4"><td class="memItemLeft" align="right" valign="top"><a id="a32d4d131ae69751924a2759964b8e6f4" name="a32d4d131ae69751924a2759964b8e6f4"></a>
QRect&#160;</td><td class="memItemRight" valign="bottom"><b>mDrawTextRect</b></td></tr>
<tr class="memdesc:a32d4d131ae69751924a2759964b8e6f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">记录text的绘制位置 <br /></td></tr>
<tr class="separator:a32d4d131ae69751924a2759964b8e6f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8967354bac3503e82d8e6e56218f9897" id="r_a8967354bac3503e82d8e6e56218f9897"><td class="memItemLeft" align="right" valign="top"><a id="a8967354bac3503e82d8e6e56218f9897" name="a8967354bac3503e82d8e6e56218f9897"></a>
QRect&#160;</td><td class="memItemRight" valign="bottom"><b>mDrawIndicatorArrowRect</b></td></tr>
<tr class="memdesc:a8967354bac3503e82d8e6e56218f9897"><td class="mdescLeft">&#160;</td><td class="mdescRight">记录IndicatorArrow的绘制位置 <br /></td></tr>
<tr class="separator:a8967354bac3503e82d8e6e56218f9897"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a897e1547814d816b3a736260fe2feb5d" id="r_a897e1547814d816b3a736260fe2feb5d"><td class="memItemLeft" align="right" valign="top"><a id="a897e1547814d816b3a736260fe2feb5d" name="a897e1547814d816b3a736260fe2feb5d"></a>
QSize&#160;</td><td class="memItemRight" valign="bottom"><b>mSizeHint</b></td></tr>
<tr class="memdesc:a897e1547814d816b3a736260fe2feb5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">保存计算好的sizehint <br /></td></tr>
<tr class="separator:a897e1547814d816b3a736260fe2feb5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaaaa3fd329220d95acd669867c8623c9" id="r_aaaaa3fd329220d95acd669867c8623c9"><td class="memItemLeft" align="right" valign="top"><a id="aaaaa3fd329220d95acd669867c8623c9" name="aaaaa3fd329220d95acd669867c8623c9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mIsTextNeedWrap</b> { false }</td></tr>
<tr class="memdesc:aaaaa3fd329220d95acd669867c8623c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">标记文字是否需要换行显示 <br /></td></tr>
<tr class="separator:aaaaa3fd329220d95acd669867c8623c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
静态 Public 属性</h2></td></tr>
<tr class="memitem:a979ad81c8aa6297ad832e8327008d569" id="r_a979ad81c8aa6297ad832e8327008d569"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a979ad81c8aa6297ad832e8327008d569">s_enableWordWrap</a> = false</td></tr>
<tr class="memdesc:a979ad81c8aa6297ad832e8327008d569"><td class="mdescLeft">&#160;</td><td class="mdescRight">在lite模式下是否允许文字换行  <br /></td></tr>
<tr class="separator:a979ad81c8aa6297ad832e8327008d569"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac36ee7139784cd85fc6b8cb6c730cd47" id="r_ac36ee7139784cd85fc6b8cb6c730cd47"><td class="memItemLeft" align="right" valign="top">static qreal&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac36ee7139784cd85fc6b8cb6c730cd47">s_twoLineHeightFactor</a> = 2.05</td></tr>
<tr class="memdesc:ac36ee7139784cd85fc6b8cb6c730cd47"><td class="mdescLeft">&#160;</td><td class="mdescRight">这个系数决定了文字换行时2行文本的矩形高度  <br /></td></tr>
<tr class="separator:ac36ee7139784cd85fc6b8cb6c730cd47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93d1343410aa582751c805df404bf4f6" id="r_a93d1343410aa582751c805df404bf4f6"><td class="memItemLeft" align="right" valign="top">static qreal&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a93d1343410aa582751c805df404bf4f6">s_oneLineHeightFactor</a> = 1.2</td></tr>
<tr class="memdesc:a93d1343410aa582751c805df404bf4f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">这个系数决定了单行文本的行高度  <br /></td></tr>
<tr class="separator:a93d1343410aa582751c805df404bf4f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c2cf89b7a4607477dff791a56564ca4" id="r_a4c2cf89b7a4607477dff791a56564ca4"><td class="memItemLeft" align="right" valign="top">static qreal&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4c2cf89b7a4607477dff791a56564ca4">s_smallButtonHeightFactor</a> = 1.4</td></tr>
<tr class="memdesc:a4c2cf89b7a4607477dff791a56564ca4"><td class="mdescLeft">&#160;</td><td class="mdescRight">这个系数决定了小按钮文本的行高度  <br /></td></tr>
<tr class="separator:a4c2cf89b7a4607477dff791a56564ca4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ad3ca447707e28f8d8ca84587449377" id="r_a7ad3ca447707e28f8d8ca84587449377"><td class="memItemLeft" align="right" valign="top">static qreal&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7ad3ca447707e28f8d8ca84587449377">s_textEllipsisAspectFactor</a> = 1.4</td></tr>
<tr class="memdesc:a7ad3ca447707e28f8d8ca84587449377"><td class="mdescLeft">&#160;</td><td class="mdescRight">文本宽度估算时的宽度比高度系数  <br /></td></tr>
<tr class="separator:a7ad3ca447707e28f8d8ca84587449377"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">成员函数说明</h2>
<a id="a176eb265edf8b5c2fdfb48219e052ae6" name="a176eb265edf8b5c2fdfb48219e052ae6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a176eb265edf8b5c2fdfb48219e052ae6">&#9670;&#160;</a></span>adjustIconSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QSize SARibbonToolButton::PrivateData::adjustIconSize </td>
          <td>(</td>
          <td class="paramtype">const QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>buttonRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QSize &amp;</td>          <td class="paramname"><span class="paramname"><em>originIconSize</em></span>&#160;) const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>适应iconsize </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">buttonRect</td><td></td></tr>
    <tr><td class="paramname">originIconSize</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="afd2575180df92c2222aa1d69b4772654" name="afd2575180df92c2222aa1d69b4772654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd2575180df92c2222aa1d69b4772654">&#9670;&#160;</a></span>calcDrawRects()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::PrivateData::calcDrawRects </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>iconRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>textRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>indicatorArrowRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>spacing</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>indicatorLen</em></span>&#160;) const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>计算绘图的几个关键区域 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
    <tr><td class="paramname">iconRect</td><td>绘制图标的矩形区域 </td></tr>
    <tr><td class="paramname">textRect</td><td>绘制文本的矩形区域 </td></tr>
    <tr><td class="paramname">indicatorArrowRect</td><td>绘制菜单下箭头的矩形区域 </td></tr>
    <tr><td class="paramname">spacing</td><td></td></tr>
    <tr><td class="paramname">indicatorLen</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="acb95c0fd2f97a05bc033c7fc16a27b1e" name="acb95c0fd2f97a05bc033c7fc16a27b1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb95c0fd2f97a05bc033c7fc16a27b1e">&#9670;&#160;</a></span>calcLargeButtonDrawRects()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::PrivateData::calcLargeButtonDrawRects </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>iconRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>textRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>indicatorArrowRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>spacing</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>indicatorLen</em></span>&#160;) const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>计算大按钮模式下的绘制尺寸（普通） </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
    <tr><td class="paramname">iconRect</td><td></td></tr>
    <tr><td class="paramname">textRect</td><td></td></tr>
    <tr><td class="paramname">indicatorArrowRect</td><td></td></tr>
    <tr><td class="paramname">spacing</td><td></td></tr>
    <tr><td class="paramname">indicatorLen</td><td></td></tr>
  </table>
  </dd>
</dl>
<p>3行模式的图标比较大，文字换行情况下，indicator会动态调整</p>

</div>
</div>
<a id="af6c08de93437c4fc868d8a4829819c2a" name="af6c08de93437c4fc868d8a4829819c2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6c08de93437c4fc868d8a4829819c2a">&#9670;&#160;</a></span>calcLargeButtonSizeHint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QSize SARibbonToolButton::PrivateData::calcLargeButtonSizeHint </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Qt6.4 取消了QApplication::globalStrut</p>

</div>
</div>
<a id="ac2ceb8ec65b84e145b8c4e7e1d54bdd9" name="ac2ceb8ec65b84e145b8c4e7e1d54bdd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2ceb8ec65b84e145b8c4e7e1d54bdd9">&#9670;&#160;</a></span>calcSizeHint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QSize SARibbonToolButton::PrivateData::calcSizeHint </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>计算sizehint </p>
<p>此函数非常关键，因为所有尺寸计算都是基于原始的rect来的 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a85476b6718f349246e9e9480bd41c138" name="a85476b6718f349246e9e9480bd41c138"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85476b6718f349246e9e9480bd41c138">&#9670;&#160;</a></span>calcSmallButtonDrawRects()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::PrivateData::calcSmallButtonDrawRects </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>iconRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>textRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QRect &amp;</td>          <td class="paramname"><span class="paramname"><em>indicatorArrowRect</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>spacing</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>indicatorLen</em></span>&#160;) const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>计算小按钮模式下的绘制尺寸 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
    <tr><td class="paramname">iconRect</td><td></td></tr>
    <tr><td class="paramname">textRect</td><td></td></tr>
    <tr><td class="paramname">indicatorArrowRect</td><td></td></tr>
    <tr><td class="paramname">spacing</td><td></td></tr>
    <tr><td class="paramname">indicatorLen</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6527ebe37c58466ca38e492ff2d517b3" name="a6527ebe37c58466ca38e492ff2d517b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6527ebe37c58466ca38e492ff2d517b3">&#9670;&#160;</a></span>calcSmallButtonSizeHint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QSize SARibbonToolButton::PrivateData::calcSmallButtonSizeHint </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Qt6.4 取消了QApplication::globalStrut</p>

</div>
</div>
<a id="abf39c798bd2f62a16fb1f71d16015820" name="abf39c798bd2f62a16fb1f71d16015820"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf39c798bd2f62a16fb1f71d16015820">&#9670;&#160;</a></span>calcTextDrawRectHeight()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SARibbonToolButton::PrivateData::calcTextDrawRectHeight </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>计算文本高度 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="ac7ce60606bef54826c1ef0efe38d2bda" name="ac7ce60606bef54826c1ef0efe38d2bda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7ce60606bef54826c1ef0efe38d2bda">&#9670;&#160;</a></span>estimateLargeButtonTextWidth()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SARibbonToolButton::PrivateData::estimateLargeButtonTextWidth </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>buttonHeight</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>textDrawRectHeight</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;</td>          <td class="paramname"><span class="paramname"><em>text</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QFontMetrics &amp;</td>          <td class="paramname"><span class="paramname"><em>fm</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>maxTrycount</em><span class="paramdefsep"> = </span><span class="paramdefval">3</span></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>估算一个最优的文字尺寸，在可以换行的情况下会进行换行，且只会换一行 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">buttonHeight</td><td>按钮的高度 </td></tr>
    <tr><td class="paramname">textDrawRectHeight</td><td>文本绘制的高度 </td></tr>
    <tr><td class="paramname">fm</td><td>QFontMetrics </td></tr>
    <tr><td class="paramname">widthHeightRatio</td><td>宽高比，宽度/高度的比值，如果大于这个比值，则会进行尝试换行以获取更低的宽度 </td></tr>
    <tr><td class="paramname">maxTrycount</td><td>尝试次数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>
<p>&lt; 建议的宽度</p>
<p>说明文字带有换行符，是用户手动换行，这种情况就直接返回字体尺寸，不进行估算</p>
<p>大于宽高比尝试进行文字换行 这里先对文本长度逐渐加长估算，一直到和原来长度一致为止</p>
<p>先计算两行文本的紧凑矩形 从一半开始逐渐递增 第1次为 w/2 + w/2 * (0/3) 第2次为 w/2 + w/2 * (1/3) 第3次为 w/2 + w/2 * (2/3)</p>
<p>说明是不换行</p>

</div>
</div>
<a id="a3e136b6f3704af9d8ed4391437dc9170" name="a3e136b6f3704af9d8ed4391437dc9170"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e136b6f3704af9d8ed4391437dc9170">&#9670;&#160;</a></span>hasIndicator()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SARibbonToolButton::PrivateData::hasIndicator </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>判断是否有Indicator </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a00ead57d1fbebadda3b742c6246e350a" name="a00ead57d1fbebadda3b742c6246e350a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00ead57d1fbebadda3b742c6246e350a">&#9670;&#160;</a></span>isTextNeedWrap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SARibbonToolButton::PrivateData::isTextNeedWrap </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>确认文字是否确切要换行显示 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a6dd298358b5f4ae7c66094bd0838fc36" name="a6dd298358b5f4ae7c66094bd0838fc36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6dd298358b5f4ae7c66094bd0838fc36">&#9670;&#160;</a></span>simplified()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString SARibbonToolButton::PrivateData::simplified </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;</td>          <td class="paramname"><span class="paramname"><em>str</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>仅仅对<br  />
进行剔除 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="acb38e7a1c0c09b6e8cc7c3330317433a" name="acb38e7a1c0c09b6e8cc7c3330317433a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb38e7a1c0c09b6e8cc7c3330317433a">&#9670;&#160;</a></span>updateDrawRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::PrivateData::updateDrawRect </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>更新绘图的几个关键尺寸 </p>
<p>包括：</p>
<ul>
<li>DrawIconRect 绘制图标的矩形区域</li>
<li>DrawTextRect 绘制文本的矩形区域</li>
<li>DrawIndicatorArrowRect 绘制菜单下箭头的矩形区域</li>
</ul>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac1f7c2d493bfcffceaa07ce1de3156f0" name="ac1f7c2d493bfcffceaa07ce1de3156f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1f7c2d493bfcffceaa07ce1de3156f0">&#9670;&#160;</a></span>updateSizeHint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::PrivateData::updateSizeHint </td>
          <td>(</td>
          <td class="paramtype">const QStyleOptionToolButton &amp;</td>          <td class="paramname"><span class="paramname"><em>opt</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>更新sizehint </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">opt</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8e9815c1bd1e36a8a2cabecc45067ce4" name="a8e9815c1bd1e36a8a2cabecc45067ce4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e9815c1bd1e36a8a2cabecc45067ce4">&#9670;&#160;</a></span>updateStatusByMousePosition()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SARibbonToolButton::PrivateData::updateStatusByMousePosition </td>
          <td>(</td>
          <td class="paramtype">const QPoint &amp;</td>          <td class="paramname"><span class="paramname"><em>pos</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>根据鼠标的位置更新状态，主要用于判断鼠标是否位于subcontrol </p>
<p>此函数主要应用在action menu模式下 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a979ad81c8aa6297ad832e8327008d569" name="a979ad81c8aa6297ad832e8327008d569"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a979ad81c8aa6297ad832e8327008d569">&#9670;&#160;</a></span>s_enableWordWrap</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool SARibbonToolButton::PrivateData::s_enableWordWrap = false</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在lite模式下是否允许文字换行 </p>
<p>如果允许，则图标相对比较小，默认不允许 </p>

</div>
</div>
<a id="a93d1343410aa582751c805df404bf4f6" name="a93d1343410aa582751c805df404bf4f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93d1343410aa582751c805df404bf4f6">&#9670;&#160;</a></span>s_oneLineHeightFactor</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">qreal SARibbonToolButton::PrivateData::s_oneLineHeightFactor = 1.2</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>这个系数决定了单行文本的行高度 </p>
<p>此值应该大于1</p>
<p>文本区域高度 = fontMetrics.lineSpacing*系数 </p>

</div>
</div>
<a id="a4c2cf89b7a4607477dff791a56564ca4" name="a4c2cf89b7a4607477dff791a56564ca4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c2cf89b7a4607477dff791a56564ca4">&#9670;&#160;</a></span>s_smallButtonHeightFactor</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">qreal SARibbonToolButton::PrivateData::s_smallButtonHeightFactor = 1.4</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>这个系数决定了小按钮文本的行高度 </p>
<p>此值应该大于1</p>
<p>文本区域高度 = fontMetrics.lineSpacing*系数 </p>

</div>
</div>
<a id="a7ad3ca447707e28f8d8ca84587449377" name="a7ad3ca447707e28f8d8ca84587449377"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ad3ca447707e28f8d8ca84587449377">&#9670;&#160;</a></span>s_textEllipsisAspectFactor</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">qreal SARibbonToolButton::PrivateData::s_textEllipsisAspectFactor = 1.4</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>文本宽度估算时的宽度比高度系数 </p>
<p>超过此系数的宽度时，开始尝试换行，例如按钮高度为h，如果单行文本的宽度大于h*系数，则按钮将不进行横向拉伸，类似于maxwidth效果</p>
<p>此系数和maxwidth取最小值 </p>

</div>
</div>
<a id="ac36ee7139784cd85fc6b8cb6c730cd47" name="ac36ee7139784cd85fc6b8cb6c730cd47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac36ee7139784cd85fc6b8cb6c730cd47">&#9670;&#160;</a></span>s_twoLineHeightFactor</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">qreal SARibbonToolButton::PrivateData::s_twoLineHeightFactor = 2.05</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>这个系数决定了文字换行时2行文本的矩形高度 </p>
<p>此值应该大于2</p>
<p>文本区域高度 = fontMetrics.lineSpacing*系数 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/<b>SARibbonToolButton.cpp</b></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_s_a_ribbon_tool_button.html">SARibbonToolButton</a></li><li class="navelem"><a class="el" href="class_s_a_ribbon_tool_button_1_1_private_data.html">PrivateData</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
